[PATCH] h266parser: Fix APS ID bounds check in APS parsing
authorCarlos Bentzen <cadubentzen@igalia.com>
Fri, 20 Feb 2026 16:40:24 +0000 (17:40 +0100)
committerMoritz Mühlenhoff <jmm@debian.org>
Mon, 30 Mar 2026 21:57:55 +0000 (23:57 +0200)
Gbp-Pq: Name CVE-2026-3086.patch

gst-libs/gst/codecparsers/gsth266parser.c

index 7649e2ca0627a566d68a68bd1ff88a2bec376b38..5cf4b1c27ff8e0cb47103e5143a3b6f9abb53ee5 100644 (file)
@@ -4389,7 +4389,7 @@ gst_h266_parse_aps (GstH266Parser * parser, GstH266NalUnit * nalu,
   READ_UINT8 (&nr, params_type, 3);
   aps->params_type = params_type;
   READ_UINT8 (&nr, aps->aps_id, 5);
-  CHECK_ALLOWED_MAX (aps->aps_id, GST_H266_MAX_APS_COUNT);
+  CHECK_ALLOWED_MAX (aps->aps_id, GST_H266_MAX_APS_COUNT - 1);
   READ_UINT8 (&nr, aps->chroma_present_flag, 1);
 
   switch (aps->params_type) {